import {ApiProperty} from "@nestjs/swagger";
import {SysUser} from "../entity/SysUser";

// @Entity("sys_user", {synchronize: false})
export class SysUserDto extends SysUser{


    constructor(roleId?: number, newPwd?: string) {
        super();
        this.roleId = roleId;
        this.newPwd = newPwd;
    }

    // @ApiProperty({description: "用户ID"})
    // @IsNotEmpty({
    //     message: "用户ID不能为空!",
    //     groups: [Validate_Mods.detail]}
    // )
    // @PrimaryColumn({name: "id"})
    // userId: number;
    //
    // @ApiProperty({description: "账号"})
    // @Column({name: "username"})
    // account: string;
    //
    // @ApiProperty({description: "密码"})
    // @Column({name: "password"})
    // pwd: string;
    //
    // @ApiProperty({description: "用户姓名"})
    // @Column({name: "name"})
    // userName: string;
    //
    @ApiProperty({description: "角色ID"})
    roleId: number;
    //
    // @ApiProperty({description: "角色列表"})
    // roleList: SysRole[];

    @ApiProperty({description: "新密码"})
    newPwd: string;
}
